import { Navigate } from "react-router-dom"

// 导航守卫
function Usedaohang(Com) {
  return ()=>{
    const token=localStorage.getItem('token')
    if(!token){
        return <Navigate to={'/login'}/>
    }else{
        return <Com/>
    }
  }
}

export default Usedaohang
